package com.base;

public class TestFor {
	
	public void ThreeDivide()
	{
		int cnt = 0;
		
		for(int i = 1 ; i <= 100 ; i++)
		{
			if(i % 3 == 0)
			{
				System.out.println("i = " + i);
				cnt++;
			}
			if(cnt == 5)
				break;
		}
	}
	
	public void FindPrimeNumber()
	{
		
		for(int i = 101;i < 201;i++)
		{
			boolean flag = true;
			for(int j = 2; j < i;j++)
			{
				if(i%j == 0)
				{
					flag = false;
					break;
				}
			}
			
			if(!flag)
			{
				continue;
			}			
			System.out.println("i = " + i);
		}
	}
	
	public static void main(String args[])
	{
		int result = 0,f = 1;
		for(int i = 1;i < 10;i++)
		{
			f = f * i;
			result += f; 
		}
		
		System.out.println("result = " + result);
		TestFor test1 = new TestFor();
		test1.ThreeDivide();
		test1.FindPrimeNumber();
	}
}
